/*
 * uarts.h
 *
 *  Created on: Jan 31, 2024
 *      Author: TT
 */

#ifndef INC_UARTS_H_
#define INC_UARTS_H_

#include "main.h"
#include "cmsis_os.h"
#include <stdio.h>
#include <stdarg.h>
#include <stdbool.h>
#include "string.h"

#define UART_BUFFSIZE    200   // 定义缓冲区的大小
typedef struct
{
	uint16_t Uart_SendLens;  //待发送数据长度
	uint16_t RecvQue_Head;   //新接收数据环形队列头指针
	uint16_t Uart_RecvLens;  //接收到的数据长度
	uint16_t RecvQue_Tail;   //新接收数据环形队列尾指针
	uint8_t Uart_SentBuff[UART_BUFFSIZE];
	uint8_t Uart_RecvBuff[UART_BUFFSIZE];
}UART_STR;

UART_STR Uart1_Str,Uart2_Str;

extern UART_HandleTypeDef huart1;
extern DMA_HandleTypeDef hdma_usart1_rx;
extern DMA_HandleTypeDef hdma_usart1_tx;


void USART1_IRQHandler(void);

#endif /* INC_UARTS_H_ */
